from django.shortcuts import render

# Create your views here.
from rest_framework.generics import ListCreateAPIView, RetrieveUpdateDestroyAPIView

from books.models import HeroInfo
from hero_drf.seriallizers import HeroModelSerializer


class HerosModelView(ListCreateAPIView):
    serializer_class = HeroModelSerializer
    queryset = HeroInfo.objects.all()

class HeroModelView(RetrieveUpdateDestroyAPIView):
    serializer_class = HeroModelSerializer
    queryset = HeroInfo.objects.all()

#
# {
#     "id": 1,
#     "hname": "",
#     "hgender": 0,
#     "hcomment": "降龙十八掌",
#     "is_delete": true,
#     "hbook": 6
# }
